package top.yongyan0624.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;
import java.util.Map;

/**
 * @author Yongyan
 * @description: TODO
 * @date 2021/9/11
 **/
@Data
@Accessors(chain = true)
public class Alipay {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String outTradeNo;

    private String subject;

    private String totalAmount;

    private String body;

    private String address;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String goodsIds;

    //接收前端商品信息
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @TableField(exist = false)
    private Map<Long,Integer> goodsMap;

    //商品信息反馈给前端
    @TableField(exist = false)
    private List<Goods> goodsList;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private Long userId;

    @TableField(exist = false)
    private SysUser user;

    /**
     * 超时时间参数
     */
    @TableField(exist = false)
    private String timeout_express= "20m";
    /**
     * 产品编号
     */
    @TableField(exist = false)
    private String product_code= "FAST_INSTANT_TRADE_PAY";
}
